import http from '@/utils/request.js'
/**
 * 获取评论
 * @param {*} page
 * @param {*} per_page
 */
export const reqGetComments = (page, per_page) => {
  return http({
    method: 'get',
    url: '/mp/v1_0/articles',
    params: {
      page,
      per_page,
      response_type: 'comment'
    }
  })
}
/**
 * 打开关闭评论
 * @param {*} id  文章编号
 * @param {*} allow_comment  打开关闭评论
 */
export const reqModCommentStatus = (id, allow_comment) => {
  return http({
    method: 'put',
    url: '/mp/v1_0/comments/status',
    params: {
      article_id: id
    },
    data: {
      allow_comment
    }
  })
}
